﻿
namespace Enferno.Public.Web.Models
{
    public interface ICheckoutShipToModel<TAddressModel>
        where TAddressModel: AddressModel
    {
        TAddressModel DeliveryAddress { get; set; }
    }

    public abstract class CheckoutShipToBaseModel<TAddressModel> : ICheckoutShipToModel<TAddressModel>
        where TAddressModel: AddressModel
    {
        public int CustomerId { get; set; }
        public TAddressModel DeliveryAddress { get; set; }
    }

    public class CheckoutCompanyShipToModel : CheckoutCompanyShipToBaseModel<CompanyInformationModel, AddressModel>
    {
        
    }

    public class CheckoutCompanyShipToBaseModel<TCompanyInformationModel, TAddressModel> : CheckoutShipToBaseModel<TAddressModel>
        where TCompanyInformationModel: CompanyInformationModel
        where TAddressModel: AddressModel
    {
        public int? CompanyId { get; set; }
        public string CompanyCode { get; set; }
        public string OrganisationNumber { get; set; }
        public TCompanyInformationModel CompanyInformation { get; set; }
    }

    public class CheckoutPrivateShipToModel : CheckoutPrivateShipToBaseModel<PersonInformationModel, AddressModel>
    {
        
    }

    public class CheckoutPrivateShipToBaseModel<TPersonInformationModel, TAddressModel> : CheckoutShipToBaseModel<TAddressModel>
        where TPersonInformationModel: PersonInformationModel
        where TAddressModel: AddressModel
    {
        public string SocialSecurityNumber { get; set; }
        public TPersonInformationModel PersonInformation { get; set; }
    }
}
